
// const { Sequelize, DataTypes } = require("sequelize");
const { STRING, INTEGER, DATE } = require('../types')

module.exports = (sequelize) => {
  const period = sequelize.define(
    'period',
    {// 在这里定义模型属性
      id: {
        type: INTEGER,
        primaryKey:true,
        autoIncrement:true,
        allowNull:false
      },
      period: { // 经期
        type: STRING,
      },
      date: { // 日期-年月
        type: STRING,
      },
      userId: { // 用户
        type: STRING,
      },
    },
    {
    tableName: "period",//直接提供表名
    timestamps: false
   }
  );
  return period
}
